#include "snake.h"

void Snake::newCell(SnakeCell* cell) {
    SnakeCell *preHead = body.front();
    body.push_front(cell);
    preHead->is_head = false;
    cell->is_head = true;
    cell->direction = direction;
}

void Snake::reset(SnakeCell* head, Direction& direction) {
    body.clear();
    body.push_front(head);

    this->direction = direction;
}
